package com.heima.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.heima.entity.Dept;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserDto implements Serializable {
    private boolean admin = true;
    private String avatar;
    private String createBy;
    private String updateBy;
    private Integer deptId;
    private String userName;
    private String nickName;
    private String email;
    private String phonenumber;
    private String sex;
    private String salt;
    private String status;
    private char delFlag;
    private String loginIp;
    private Integer roleIds;
    private String password;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private Dept dept;
    private List role = new ArrayList<>();
}
